<!DOCTYPE html>
<html>
<head>
	<title>功能选择</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <script src="js/mui.js"></script>
	<script src="js/layui/layui.all.js"></script>
	<script src="js/common.js"></script>
    <link href="css/mui.css" rel="stylesheet"/>
	<link href="css/common.css" rel="stylesheet"/>  
 	<script type="text/javascript" src="js/function.js" ></script>
	<!--<script src="js/gnxz.js"></script>-->
    <!-- Nicky -->
    <script src="js/jquery.min.js"></script>
    <link rel="stylesheet" href="css/nicky.css" /> 
    <script src="js/webdb.js"></script>
</head>
<body>
	  
	<header class="mui-bar mui-bar-nav mui-bar-transparent bg main-header">
		<div class="back">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left back">返回</a>
		</div>
		<div class="back">
			<a class="mui-icon  mui-pull-center back">功能选择</a>
		</div>
	</header>
	<div class="bg main-nav"> </div>
	<div class="mui-content">
		<div class="pBox">
			<div class="pHeader">扫描或输入质检磅单号</div>
			<div class="sInput"> 
				<input type="text" id="bdid" value="质检磅单号" class="input-saomiao" /> 
			</div>
			<div class="btnBox"> 
				<button class="nbtn" id="btnReset">重 置</button> 
				<button class="nbtn" id="btnSubmit">提 交</button> 
			</div>
		</div>
		<div class="pBox pBox2">
			<div class="pHeader">质检采集结果查询</div>
			<button class="nbtn" id="btnSearch">查 询</button> 
		</div>
	</div>
</body>
<script src="js/jquery.min.js.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var uid = null, uinfo = null;
  	mui.init(); 
  	mui.plusReady(function(){
		uid = getSession('UID');
		uinfo = JSON.parse(getSession('UINFO')); 
		
  		$('#bdid').select();
  		$('#bdid').focus();
  		
  		//重置
  		$('#btnReset').on('click',function(){
  			$('#bdid').val('');
  			$('#bdid').select();
  			$('#bdid').focus();
  		});
  		
  		//提 交
  		$('#btnSubmit').on('click',function(e){
  			var bdid = $("#bdid").val().trim();
  			if(bdid.length<1){
				mui.toast('请扫描或输入质检磅单号');
				return false;
	  		}
  			plus.nativeUI.showWaiting("正在加载");
  			setTimeout(function(){
  				plus.nativeUI.closeWaiting();
  				setSession('BDID',bdid);
  				var serData = {uid:uid,uname:uinfo.UNAME,carNum:'沪A000000',bdid:bdid,desc:'物料描述'};
  				console.log(JSON.stringify(serData));
  				setSession('serData',JSON.stringify(serData));
		  		mui.openWindow({
					url:'xmjc.html'    
		  		})
  			});
  		});
  		
  		//查询
  		$('#btnSearch').click(function(){
  			mui.openWindow({ url:'query.html' });
  		});
  		
  	});
  	 
</script>
</html>